Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@aam
Copy link
Member

@aam aam commented Dec 12, 2019

_TypeNone is not used and that triggers hint in dart analyzer since dart 2.7.0

@auto-assign auto-assign bot requested a review from flar December 12, 2019 15:43
@aam aam changed the title Add hint from analyzer to ignore unused enum field. Add hint for analyzer to ignore unused enum field. Dec 12, 2019
@aam aam requested review from zanderso and removed request for flar December 12, 2019 15:46
final int _type;

// The type of SkColorFilter class to create for Skia.
// These constants must be kept in sync with ColorFilterType in paint.cc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is no longer true and should just be removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment on lines 2636 to 2637
// ignore:unused_field
static const int _TypeNone = 0; // null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than adding an ignore, let's just remove the unused field.

We should also do the same in the web_ui painting.dart

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no _TypeNone in web_ui painting.dart as far as I can tell

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than adding an ignore, let's just remove the unused field.

Done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in lib/web_ui/lib/src/engine/color_filter.dart, line 118

Copy link
Member Author

@aam aam Dec 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, got you. Interestingly this is not picked up by analyzer as unused field.

@aam aam changed the title Add hint for analyzer to ignore unused enum field. Remove unused _TypeNone enum field. Dec 12, 2019
Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants